﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Common.Framework.EntityMaster
{
    
        /// <summary>
        /// 更新表达式(批量更新时使用)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        public class UpdateExpressionsEntity<T> where T : class,new()
        {
            public UpdateExpressionsEntity()
            {

            }

            public UpdateExpressionsEntity(Expression<Func<T, bool>> filterExpression, Expression<Func<T, T>> updateExpression)
            {
                FilterExpression = filterExpression;
                UpdateExpression = updateExpression;
            }

            /// <summary>
            /// 条件过滤表达式
            /// </summary>
            public Expression<Func<T, bool>> FilterExpression { get; set; }

            /// <summary>
            /// 实体字段更新表达式
            /// </summary>
            public Expression<Func<T, T>> UpdateExpression { get; set; }
        }
}
